package com.doform.android.xianggucheng.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.doform.android.xianggucheng.R;
import com.doform.android.xianggucheng.presenter.BasePresenter;
import com.doform.android.xianggucheng.widget.TitleBar;

import butterknife.BindView;

/**
 * 作者 Y_MS
 * Created by ${APEN} on 2017/5/27.
 * GitHub：https://github.com/cxydxpx
 */

public abstract class BasePreActivity<P extends BasePresenter> extends BaseActivity{
    @BindView(R.id.titleBar)
    protected
    TitleBar titleBar;
    public P mPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {

        mPresenter = createPresenter();

        super.onCreate(savedInstanceState);
        titleBar.setBackListener(this);
    }

    protected abstract P createPresenter();
}
